package com.fjec.market.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fjec.common.protocol.JsonResult;
import com.fjec.market.entity.InfoFarmer;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 004.果农表 服务类
 * </p>
 *
 * @author admin
 * @since 2020-09-07
 */
public interface IInfoFarmerService extends IService<InfoFarmer> {
    JsonResult getFarmerByUserId(Long userId);

    JsonResult saveFarmer(InfoFarmer farmer, String markCodes, Long picId, Object verifyCode);

    List<InfoFarmer> getFarmerByMarkCode(Integer markCode, Page page);

    Map<String, Object> getFarmerDepoStatusByUserId(Long userId);

    Map<String, Object> getBusinessDepoStatusByUserId(Long userId);

    List<InfoFarmer> getFarmersByFarmerIdsAndMarkCode(int markCode, List<Long> farmerIds, Page page);

    /**
     * 查询保证金信息
     *
     * @return
     */
    JsonResult getDepositInfo();

    List<InfoFarmer> getFarmerByShopNumAndMarkCode(int markCode, Long shopNum);

    /**
     * 获取需要生成shopNum的果农列表
     *
     * @param limit
     * @param minutes
     * @return
     */
    List<Map<String, Object>> getFarmerForShopNumGen(Integer limit, Integer minutes);
}
